﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;

namespace HelloApp2.Controllers
{
    [ApiController]
    public class PeopleController : ControllerBase
    {
        [HttpGet("peoples")]
        public ActionResult<IEnumerable<Person>> GetAll()
        {
            return new[]
            {
                new Person { Name = "Ana", Age = 20, Id = "1"},
                new Person { Name = "Felipe", Age = 30, Id ="2" },
                new Person { Name = "Emillia", Age = 40, Id="3" }
            };
        }
    }

    public class Person
    {
        public string Name { get; set; }
        public int Age { get; set; }
        public string Id { get; set; }
    }

}

